package org.dormnet.dao.mapping;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

import org.dormnet.dao.bean.Diary;

public class DiaryMapping implements BeanMapping {
	public Object mapping(ResultSet resultSet) throws SQLException {
		Diary diary = new Diary();
		diary.setDaId(resultSet.getInt("daId"));
		diary.setContent(resultSet.getString("content"));
		diary.setDormid(resultSet.getInt("Dormid"));
		diary.setIsdeleted(resultSet.getInt("isdeleted"));
		diary.setDtime(resultSet.getDate("dtime"));
		diary.setTitle(resultSet.getString("Title"));
		diary.setAuthor(resultSet.getString("author"));
		return diary;
	}

}
